package com.ltmonitor.service.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ltmonitor.dao.IUserPreferenceDao;
import com.ltmonitor.entity.UserPreference;
import com.ltmonitor.service.IUserPreferenceService;

@Service("userPreferenceService")
public class UserPreferenceService extends BaseService<Long, UserPreference> implements IUserPreferenceService {

	@Autowired
	private IUserPreferenceDao userPreferenceDao;

	/**
	 * 获取指定用户的参数设置
	 * @param userId
	 * @return
	 */
	@Override
	public UserPreference getUserPreferenceByUserId(long userId) {
		 String hql = "from UserPreference where userId = ?";
		 return this.userPreferenceDao.find(hql, userId);
	}
}
